 package server.life;
 import constants.GameConstants;
 import java.awt.Point;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.EnumMap;
 import java.util.HashMap;
 import java.util.LinkedList;
 import java.util.List;
 import java.util.Map;
 import tools.Pair;

 public class MapleMonsterStats {
   private final int id;
/*  15 */   private final EnumMap<Element, ElementalEffectiveness> resistance = new EnumMap<>(Element.class);
/*  16 */   private final Map<String, Integer> animationTimes = new HashMap<>();

/*  18 */   private final List<Pair<Integer, Integer>> skills = new ArrayList<>();
/*  19 */   private final List<MobAttackInfo> mai = new ArrayList<>(); private byte cp;
   private byte selfDestruction_action;
   private byte tagColor;
   private byte tagBgColor;
   private byte rareItemDropLevel;
   private byte HPDisplayType;
   private byte summonType;
   private byte category;
   private short level;
   private short charismaEXP;
   private long hp;
   private int exp;
   private int mp;
   private int removeAfter;
   private int buffToGive;
   private int fixedDamage;
   private int selfDestruction_hp;
   private int dropItemPeriod;
   private int point;
   private int eva;
   private int acc;
   private int PhysicalAttack;
   private int MagicAttack;
   private int speed;
   private int partyBonusR;
   private int pushed;
   private int link;
/*  46 */   private Map<String, Integer> hitParts = new HashMap<>(); private int weaponPoint; private int PDRate; private int MDRate; private int smartPhase; private int range; private int detectX; private int senseX; private boolean boss; private boolean undead; private boolean ffaLoot; private boolean firstAttack; private boolean isExplosiveReward; private boolean mobile; private boolean fly; private boolean onlyNormalAttack; private boolean friendly; private boolean noDoom; private boolean invincible; private boolean partyBonusMob; private boolean changeable; private boolean escort; private boolean removeOnMiss; private boolean skeleton; private boolean ignoreMoveImpact; private boolean hasRange; private String name; private String mobType;
/*  47 */   private List<Integer> revives = new ArrayList<>();
/*  48 */   private List<Pair<Point, Point>> mobZone = new ArrayList<>();
/*  49 */   private Pair<Integer, Integer> cool = null;
/*  50 */   private List<MapleLifeFactory.loseItem> loseItem = null;
/*  51 */   private List<BanishInfo> banish = new ArrayList<>();
   private TransMobs transMobs;
/*  53 */   private final Map<Pair<Integer, Integer>, Integer> afterAttack = new HashMap<>();
/*  54 */   private final Map<Pair<Integer, Integer>, Integer> skillAfter = new HashMap<>();
/*  55 */   private final List<MobAttack> attacks = new ArrayList<>();

   public MapleMonsterStats(int id) {
/*  58 */     this.id = id;
   }

   public int getId() {
/*  62 */     return this.id;
   }

   public int getExp() {
/*  66 */     return this.exp;
   }

   public void setExp(int exp) {
/*  70 */     this.exp = exp;
   }

   public long getHp() {
/*  74 */     return this.hp;
   }

   public void setHp(long hp) {
/*  78 */     this.hp = hp;
   }

   public int getMp() {
/*  82 */     return this.mp;
   }

   public void setMp(int mp) {
/*  86 */     this.mp = mp;
   }

   public short getLevel() {
/*  90 */     return this.level;
   }

   public void setLevel(short level) {
/*  94 */     this.level = level;
   }

   public int getWeaponPoint() {
/*  98 */     return this.weaponPoint;
   }

   public void setWeaponPoint(int wp) {
/* 102 */     this.weaponPoint = wp;
   }

   public short getCharismaEXP() {
/* 106 */     return this.charismaEXP;
   }

   public void setCharismaEXP(short leve) {
/* 110 */     this.charismaEXP = leve;
   }

   public byte getSelfD() {
/* 114 */     return this.selfDestruction_action;
   }

   public void setSelfD(byte selfDestruction_action) {
/* 118 */     this.selfDestruction_action = selfDestruction_action;
   }

   public void setSelfDHP(int selfDestruction_hp) {
/* 122 */     this.selfDestruction_hp = selfDestruction_hp;
   }

   public int getSelfDHp() {
/* 126 */     return this.selfDestruction_hp;
   }

   public int getFixedDamage() {
/* 130 */     return this.fixedDamage;
   }

   public void setFixedDamage(int damage) {
/* 134 */     this.fixedDamage = damage;
   }

   public int getPushed() {
/* 138 */     return this.pushed;
   }

   public void setPushed(int damage) {
/* 142 */     this.pushed = damage;
   }

   public int getPhysicalAttack() {
/* 146 */     return this.PhysicalAttack;
   }

   public void setPhysicalAttack(int PhysicalAttack) {
/* 150 */     this.PhysicalAttack = PhysicalAttack;
   }

   public int getMagicAttack() {
/* 154 */     return this.MagicAttack;
   }

   public void setMagicAttack(int MagicAttack) {
/* 158 */     this.MagicAttack = MagicAttack;
   }

   public int getEva() {
/* 162 */     return this.eva;
   }

   public void setEva(int eva) {
/* 166 */     this.eva = eva;
   }

   public int getAcc() {
/* 170 */     return this.acc;
   }

   public void setAcc(int acc) {
/* 174 */     this.acc = acc;
   }

   public int getSpeed() {
/* 178 */     return this.speed;
   }

   public void setSpeed(int speed) {
/* 182 */     this.speed = speed;
   }

   public int getPartyBonusRate() {
/* 186 */     return this.partyBonusR;
   }

   public void setPartyBonusRate(int speed) {
/* 190 */     this.partyBonusR = speed;
   }

   public void setOnlyNormalAttack(boolean onlyNormalAttack) {
/* 194 */     this.onlyNormalAttack = onlyNormalAttack;
   }

   public boolean getOnlyNoramlAttack() {
/* 198 */     return this.onlyNormalAttack;
   }

   public List<BanishInfo> getBanishInfo() {
/* 202 */     return this.banish;
   }

   public void setBanishInfo(List<BanishInfo> banish) {
/* 206 */     this.banish = banish;
   }

   public int getRemoveAfter() {
/* 210 */     return this.removeAfter;
   }

   public void setRemoveAfter(int removeAfter) {
/* 214 */     this.removeAfter = removeAfter;
   }

   public byte getrareItemDropLevel() {
/* 218 */     return this.rareItemDropLevel;
   }

   public void setrareItemDropLevel(byte rareItemDropLevel) {
/* 222 */     this.rareItemDropLevel = rareItemDropLevel;
   }

   public boolean isBoss() {
/* 226 */     return this.boss;
   }

   public void setBoss(boolean boss) {
/* 230 */     this.boss = boss;
   }

   public boolean isFfaLoot() {
/* 234 */     return this.ffaLoot;
   }

   public void setFfaLoot(boolean ffaLoot) {
/* 238 */     this.ffaLoot = ffaLoot;
   }

   public boolean isEscort() {
/* 242 */     return this.escort;
   }

   public void setEscort(boolean ffaL) {
/* 246 */     this.escort = ffaL;
   }

   public boolean isExplosiveReward() {
/* 250 */     return this.isExplosiveReward;
   }

   public void setExplosiveReward(boolean isExplosiveReward) {
/* 254 */     this.isExplosiveReward = isExplosiveReward;
   }

   public void setAnimationTime(String name, int delay) {
/* 258 */     this.animationTimes.put(name, Integer.valueOf(delay));
   }

   public int getAnimationTime(String name) {
/* 262 */     Integer ret = this.animationTimes.get(name);
/* 263 */     if (ret == null) {
/* 264 */       return 500;
     }
/* 266 */     return ret.intValue();
   }

   public void setAttacks(List<MobAttack> attack_) {
/* 270 */     for (MobAttack attack : attack_) {
/* 271 */       this.attacks.add(attack);
     }
   }

   public List<MobAttack> getAttacks() {
/* 276 */     return Collections.unmodifiableList(this.attacks);
   }

   public boolean isMobile() {
/* 280 */     return (this.animationTimes.containsKey("move") || this.animationTimes.containsKey("fly"));
   }

   public boolean isFly() {
/* 284 */     return this.fly;
   }

   public void setFly(boolean fly) {
/* 288 */     this.fly = fly;
   }

   public List<Integer> getRevives() {
/* 292 */     return this.revives;
   }

   public void setRevives(List<Integer> revives) {
/* 296 */     this.revives = revives;
   }

   public boolean getUndead() {
/* 300 */     return this.undead;
   }

   public void setUndead(boolean undead) {
/* 304 */     this.undead = undead;
   }

   public byte getSummonType() {
/* 308 */     return this.summonType;
   }

   public void setSummonType(byte selfDestruction) {
/* 312 */     this.summonType = selfDestruction;
   }

   public byte getCategory() {
/* 316 */     return this.category;
   }

   public void setCategory(byte selfDestruction) {
/* 320 */     this.category = selfDestruction;
   }

   public int getPDRate() {
/* 324 */     return this.PDRate;
   }

   public void setPDRate(int selfDestruction) {
/* 328 */     this.PDRate = selfDestruction;
   }

   public int getMDRate() {
/* 332 */     return this.MDRate;
   }

   public void setMDRate(int selfDestruction) {
/* 336 */     this.MDRate = selfDestruction;
   }

   public EnumMap<Element, ElementalEffectiveness> getElements() {
/* 340 */     return this.resistance;
   }

   public void setEffectiveness(Element e, ElementalEffectiveness ee) {
/* 344 */     this.resistance.put(e, ee);
   }

   public void removeEffectiveness(Element e) {
/* 348 */     this.resistance.remove(e);
   }

   public ElementalEffectiveness getEffectiveness(Element e) {
/* 352 */     ElementalEffectiveness elementalEffectiveness = this.resistance.get(e);
/* 353 */     if (elementalEffectiveness == null) {
/* 354 */       return ElementalEffectiveness.正常;
     }
/* 356 */     return elementalEffectiveness;
   }


   public Integer getAfterAttack(int skillid, int skilllevel) {
/* 361 */     return this.afterAttack.get(new Pair(Integer.valueOf(skillid), Integer.valueOf(skilllevel)));
   }

   public void addAfterAttack(int skillid, int skilllevel, int afterAttack) {
/* 365 */     this.afterAttack.put(new Pair(Integer.valueOf(skillid), Integer.valueOf(skilllevel)), Integer.valueOf(afterAttack));
   }

   public Integer getSkillAfter(int skillid, int skilllevel) {
/* 369 */     return this.skillAfter.get(new Pair(Integer.valueOf(skillid), Integer.valueOf(skilllevel)));
   }

   public void addSkillAfter(int skillid, int skilllevel, int afterAttack) {
/* 373 */     this.skillAfter.put(new Pair(Integer.valueOf(skillid), Integer.valueOf(skilllevel)), Integer.valueOf(afterAttack));
   }

   public String getName() {
/* 377 */     return this.name;
   }

   public void setName(String name) {
/* 381 */     this.name = name;
   }

   public String getType() {
/* 385 */     return this.mobType;
   }

   public void setType(String mobt) {
/* 389 */     this.mobType = mobt;
   }

   public Map<String, Integer> getHitParts() {
/* 393 */     return this.hitParts;
   }

   public byte getTagColor() {
/* 397 */     return this.tagColor;
   }

   public void setTagColor(int tagColor) {
/* 401 */     this.tagColor = (byte)tagColor;
   }

   public byte getTagBgColor() {
/* 405 */     return this.tagBgColor;
   }

   public void setTagBgColor(int tagBgColor) {
/* 409 */     this.tagBgColor = (byte)tagBgColor;
   }





   public List<Pair<Integer, Integer>> getSkills() {
/* 417 */     return Collections.unmodifiableList(this.skills);
   }






   public void setSkills(List<Pair<Integer, Integer>> skill_) {
/* 426 */     for (Pair<Integer, Integer> skill : skill_) {
/* 427 */       this.skills.add(skill);
     }
   }

   public byte getNoSkills() {
/* 432 */     return (byte)this.skills.size();
   }









   public boolean hasSkill(int skillId, int level) {
/* 444 */     for (Pair<Integer, Integer> skill : this.skills) {
/* 445 */       if (((Integer)skill.getLeft()).intValue() == skillId && ((Integer)skill.getRight()).intValue() == level) {
/* 446 */         return true;
       }
     }
/* 449 */     return false;
   }

   public boolean isFirstAttack() {
/* 453 */     return this.firstAttack;
   }

   public void setFirstAttack(boolean firstAttack) {
/* 457 */     this.firstAttack = firstAttack;
   }

   public byte getCP() {
/* 461 */     return this.cp;
   }

   public void setCP(byte cp) {
/* 465 */     this.cp = cp;
   }

   public int getPoint() {
/* 469 */     return this.point;
   }

   public void setPoint(int cp) {
/* 473 */     this.point = cp;
   }

   public boolean isFriendly() {
/* 477 */     return this.friendly;
   }

   public void setFriendly(boolean friendly) {
/* 481 */     this.friendly = friendly;
   }

   public boolean isInvincible() {
/* 485 */     return this.invincible;
   }

   public void setInvincible(boolean invin) {
/* 489 */     this.invincible = invin;
   }

   public int getSmartPhase() {
/* 493 */     return this.smartPhase;
   }

   public void setSmartPhase(int smartPhase) {
/* 497 */     this.smartPhase = smartPhase;
   }

   public void setChange(boolean invin) {
/* 501 */     this.changeable = invin;
   }

   public boolean isChangeable() {
/* 505 */     return this.changeable;
   }

   public boolean isPartyBonus() {
/* 509 */     return this.partyBonusMob;
   }

   public void setPartyBonus(boolean invin) {
/* 513 */     this.partyBonusMob = invin;
   }

   public boolean isNoDoom() {
/* 517 */     return this.noDoom;
   }

   public void setNoDoom(boolean doom) {
/* 521 */     this.noDoom = doom;
   }

   public int getBuffToGive() {
/* 525 */     return this.buffToGive;
   }

   public void setBuffToGive(int buff) {
/* 529 */     this.buffToGive = buff;
   }

   public int getLink() {
/* 533 */     return this.link;
   }

   public void setLink(int link) {
/* 537 */     this.link = link;
   }

   public byte getHPDisplayType() {
/* 541 */     return this.HPDisplayType;
   }

   public void setHPDisplayType(byte HPDisplayType) {
/* 545 */     this.HPDisplayType = HPDisplayType;
   }

   public int getDropItemPeriod() {
/* 549 */     return this.dropItemPeriod;
   }

   public void setDropItemPeriod(int d) {
/* 553 */     this.dropItemPeriod = d;
   }

   public void setRemoveOnMiss(boolean removeOnMiss) {
/* 557 */     this.removeOnMiss = removeOnMiss;
   }

   public boolean removeOnMiss() {
/* 561 */     return this.removeOnMiss;
   }

   public Pair<Integer, Integer> getCool() {
/* 565 */     return this.cool;
   }

   public void setCool(Pair<Integer, Integer> cool) {
/* 569 */     this.cool = cool;
   }

   public List<Pair<Point, Point>> getMobZone() {
/* 573 */     return this.mobZone;
   }

   public void setMobZone(List<Pair<Point, Point>> mobZone) {
/* 577 */     this.mobZone = mobZone;
   }

   public boolean isSkeleton() {
/* 581 */     return this.skeleton;
   }

   public void setSkeleton(boolean skeleton) {
/* 585 */     this.skeleton = skeleton;
   }

   public boolean isIgnoreMoveImpact() {
/* 589 */     return this.ignoreMoveImpact;
   }

   public void setIgnoreMoveImpact(boolean ignoreMoveImpact) {
/* 593 */     this.ignoreMoveImpact = ignoreMoveImpact;
   }

   public boolean isHasRange() {
/* 597 */     return this.hasRange;
   }

   public void setHasRange(boolean hasRange) {
/* 601 */     this.hasRange = hasRange;
   }

   public int getRange() {
/* 605 */     return this.range;
   }

   public void setRange(int range) {
/* 609 */     this.range = range;
   }

   public int getDetectX() {
/* 613 */     return this.detectX;
   }

   public void setDetectX(int detectX) {
/* 617 */     this.detectX = detectX;
   }

   public int getSenseX() {
/* 621 */     return this.senseX;
   }

   public void setSenseX(int senseX) {
/* 625 */     this.senseX = senseX;
   }

   public List<MapleLifeFactory.loseItem> loseItem() {
/* 629 */     return this.loseItem;
   }

   public void addLoseItem(MapleLifeFactory.loseItem li) {
/* 633 */     if (this.loseItem == null) {
/* 634 */       this.loseItem = new LinkedList<>();
     }
/* 636 */     this.loseItem.add(li);
   }

   public void addMobAttack(MobAttackInfo ma) {
/* 640 */     this.mai.add(ma);
   }

   public MobAttackInfo getMobAttack(int attack) {
/* 644 */     if (attack >= this.mai.size() || attack < 0) {
/* 645 */       return null;
     }
/* 647 */     return this.mai.get(attack);
   }

   public List<MobAttackInfo> getMobAttacks() {
/* 651 */     return this.mai;
   }

   public int dropsMesoCount() {
/* 655 */     if (getRemoveAfter() != 0 || isInvincible() || getOnlyNoramlAttack() || getDropItemPeriod() > 0 || getCP() > 0 || getPoint() > 0 || getFixedDamage() > 0 || getSelfD() != -1 || getPDRate() <= 0 || getMDRate() <= 0) {
/* 656 */       return 0;
     }
/* 658 */     int mobId = getId() / 100000;
/* 659 */     if (GameConstants.getPartyPlayHP(getId()) > 0 || mobId == 97 || mobId == 95 || mobId == 93 || mobId == 91 || mobId == 90) {
/* 660 */       return 0;
     }
/* 662 */     if (isExplosiveReward()) {
/* 663 */       return 7;
     }
/* 665 */     if (isBoss()) {
/* 666 */       return 2;
     }
/* 668 */     return 1;
   }

   public TransMobs getTransMobs() {
/* 672 */     return this.transMobs;
   }

   public void setTransMobs(TransMobs transMobs) {
/* 676 */     this.transMobs = transMobs;
   }

   public static class TransMobs {
     private List<Integer> mobids;
     private List<Pair<Integer, Integer>> skills;
     private int time;
     private int cooltime;
     private int hpTriggerOn;
     private int hpTriggerOff;
/* 686 */     private int withMob = 0;

     public TransMobs(List<Integer> mobids, List<Pair<Integer, Integer>> skills, int time, int cooltime, int hpTriggerOn, int hpTriggerOff, int withMob) {
/* 689 */       this.mobids = mobids;
/* 690 */       this.skills = skills;
/* 691 */       this.time = time;
/* 692 */       this.cooltime = cooltime;
/* 693 */       this.hpTriggerOn = hpTriggerOn;
/* 694 */       this.hpTriggerOff = hpTriggerOff;
/* 695 */       this.withMob = withMob;
     }

     public List<Integer> getMobids() {
/* 699 */       return this.mobids;
     }

     public List<Pair<Integer, Integer>> getSkills() {
/* 703 */       return this.skills;
     }

     public int getTime() {
/* 707 */       return this.time;
     }

     public int getCooltime() {
/* 711 */       return this.cooltime;
     }

     public int getHpTriggerOn() {
/* 715 */       return this.hpTriggerOn;
     }

     public int getHpTriggerOff() {
/* 719 */       return this.hpTriggerOff;
     }

     public int getWithMob() {
/* 723 */       return this.withMob;
     }
   }
 }


/* Location:              C:\PGX\Server.jar!\server\life\MapleMonsterStats.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */